package dto

import "shop-bean/model"

type ShippingTemplatesDTO struct {
	*model.ShippingTemplates
	RegionList     []*ShippingTemplatesRegionDTO     `json:"regionList"`
	AppointList    []*ShippingTemplatesFreeDTO       `json:"appointList"`
	NoDeliveryList []*ShippingTemplatesDoDeliveryDTO `json:"noDeliveryList"`
}

type ShippingTemplatesRegionDTO struct {
	Region       []*RegionDTO `json:"region"`       //城市信息
	RegionName   string       `json:"regionName"`   //城市名称描述
	First        float64      `json:"first"`        //首件
	FirstPrice   float64      `json:"firstPrice"`   //首件运费
	Renewal      float64      `json:"renewal"`      //续件
	RenewalPrice float64      `json:"renewalPrice"` //续件运费
	UniqId       string       `json:"uniqId"`       //分组唯一值
}

type ShippingTemplatesFreeDTO struct {
	Region    []*RegionDTO `json:"region"`    //城市信息
	PlaceName string       `json:"placeName"` //城市名称描述
	Number    float64      `json:"number"`    //包邮件数
	Price     float64      `json:"price"`     //包邮金额
	UniqId    string       `json:"uniqId"`    //分组唯一值
}

type ShippingTemplatesDoDeliveryDTO struct {
	Region    []*RegionDTO `json:"region"`    //城市信息
	PlaceName string       `json:"placeName"` //城市名称描述
	UniqId    string       `json:"uniqId"`    //分组唯一值
}

type RegionDTO struct {
	CityId   uint         `json:"cityId"`
	Name     string       `json:"name"`
	Children []*RegionDTO `json:"children"`
}

type TempRegion struct {
	UniqId       string
	ProvinceId   uint
	City         []*RegionDTO
	NameStr      string
	First        float64
	FirstPrice   float64
	Renewal      float64
	RenewalPrice float64
}

type TempFree struct {
	UniqId     string
	ProvinceId uint
	City       []*RegionDTO
	NameStr    string
	Number     float64
	Price      float64
}

type TempDoDelivery struct {
	UniqId     string
	ProvinceId uint
	City       []*RegionDTO
	NameStr    string
}
